use axum::{extract::Request, middleware::Next, response::IntoResponse, Extension};
use axum_app_common::model::AppState;
use std::sync::Arc;
use tracing::debug;

pub async fn mid_handler_b(
    Extension(state): Extension<Arc<AppState>>,
    req: Request,
    next: Next,
) -> impl IntoResponse {
    debug!("handle mid_handler_b request: {:?}", req);
    let resp = next.run(req).await;
    debug!("handle mid_handler_b response: {:?}", resp);
    resp
}
